//
//  BaseViewController.h
//  League
//
//  Created by 博宇 李 on 2018/1/18.
//  Copyright © 2018年 ciyuanjuzhen. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIView+Frame.h"
#import "AFNetworking.h"
#import "UIImageView+WebCache.h"
#import "InternationalControl.h"
#import <RongIMKit/RongIMKit.h>
#import <RongIMLib/RongIMLib.h>

#import "UrlHeader.h"
#import "DataContrller.h"
#import "ProfileManager.h"

#define KBasicAuthName @"xiaolei"
#define KBasicAuthPassWord @"1234561"
#define kBasicAuthHeader @"Authorization"

#define kFontName @"STHeitiSC-Light"

#define kUserIdKey @"userid"
#define kUserNameKey @"username"
#define kUserUrlKey @"userurl"
#define kUserTokenKey @"usertoken"
#define kUserVerKey @"userver"

#define kIsLogin @"isLogin"  //是否登录  1 登录了
#define kLoginStr @"1" //成功登录
#define kNoLoginStr @"0" //成功登录

#define kIsremberPw @"isRemberPw"//是否记住密码
#define kIsremberStr @"1" //记住
#define kNoremberStr @"0" //没有
#define kUserName @"UserName"
#define kUserPassWord @"UserPassWord"

#define kPushName_FirstVc @"PushName_FirstVc"

#define kPickerNotifoStr @"PickerValue"
#define titleFontColor [UIColor colorWithRed:180/255.0 green:180/255.0 blue:180/255.0 alpha:1]
#define kChangeLoginNotificationName @"RootViewController"
#define kOutLoginNotificationName @"logOut"
#define kChangeLanguage @"changeLanguage"
#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif


//适配iPhoneX
#define kScreenWidth [[UIScreen mainScreen] bounds].size.width
#define kScreenHeight [[UIScreen mainScreen] bounds].size.height
#define kIs_Iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define kIs_Iphone_X (kIs_Iphone && kScreenHeight == 812.0)
#define kNaviHeight kIs_Iphone_X ? 88 : 64
#define kTabbarHeight kIs_Iphone_X ? 83 : 49
#define kBottomHeight kIs_Iphone_X ? 34 : 0

#define kAppColor [UIColor colorWithRed:114/255.0 green:140/255.0 blue:163/255.0 alpha:1]
#define kTouchTitleColor [UIColor colorWithRed:118/255.0 green:192/255.0 blue:241/255.0 alpha:1]
#define kAppBgColor [UIColor colorWithRed:68/255.0 green:82/255.0 blue:94/255.0 alpha:1]

#define sRGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]

@interface BaseViewController : UIViewController

@property (strong, nonatomic) NSString *systemLanguage;
@property (strong, nonatomic) NSBundle *languageBundle;

- (void)showAlert:(NSString *)desc;

- (void)refreshBegin;

- (void)refreshStop;

- (BaseViewController *)initializeStoryboardViewControllerWithStoryboardID:(NSString *)storyBoard viewcontroller:(NSString *)viewcontroller;

- (void)showErrorsWithMessage:(id)obj;

@end
